package com.prj.ufdm.cloud.ms.auth.enums;

/**
 * 职务类型枚举
 * @author 郑仔祥
 *
 */
public enum DutyTypeEnum {
	
	DUTY_TYPE_1("1","类型1"),
	DUTY_TYPE_2("2","类型2");
	
	private String code;
	private String message;
	
	DutyTypeEnum(String code,String message){
		this.code = code;
		this.message = message;
	}

	public static String getMessageByCode(String retCode){
		String rtnRetCode = "";
		for (DutyTypeEnum dutyTypeEnum : DutyTypeEnum.values()) {
			if(dutyTypeEnum.code.equals(retCode)){
				rtnRetCode = dutyTypeEnum.message;
			}
	    }
		return rtnRetCode;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}

}
